<div class="content-inner">
    <div class="marg20-btm">
        <a href=<?php echo site_url('backend_pages/allproducts'); ?> class="btn btn-primary">&#43; View All Products </a>
    </div>
<?php
if($up_products->num_rows()>0){
	foreach($up_products->result() as $row){
?>
	<form action=<?php echo site_url('backend_pages/update_pro'); ?> method="post" class="form-horizontal" enctype="multipart/form-data" />
    	<?php 
		
		
			$getid = array(
						 'name' => 'getid',
						 'value' => $row->Pro_title,
						 'type' => 'hidden'
						 );
			$proname = array(
						'name' => 'pro_name',
						'placeholder' => 'Product name....',
						'value' => $row->Pro_name,
						'class' => 'input-xlarge',
						'id' => 'input01'
						);
			$proprice = array(
						'name' => 'pro_price',
						'placeholder' => 'Product price....',
						'value' => $row->Pro_price,
						'class' => 'input-xlarge',
						'id' => 'input01'
						);
			$procate = array(
						$row->Cate_ID => '---'.$row->Cate_Name.'----',
						'2' => 'Computers',
						'1' => 'Phones'
						);
			$proupload = array(
						'name' => 'userfile',
						'placeholder' => 'Product upload....',
						'value' => $row->Pro_title,
						'type' => 'file',
						'size' => '20',
						'class' => 'input-xlarge',
						'id' => 'input01'
						);
			$pro_img = array(
						'src' => 'assets/uploads/thumbs/thumb_' .$row->Pro_title
						);
		?>
    	
<?PHP
		}
	}

?>
    
        <div class="control-group">
           <label class="control-label" for="fileInput">Old Image </label>
           <div class="controls">
             <div class="item-img">
                 <?php echo img($pro_img); ?>
                 <?php echo form_input($getid); ?>
             </div>
           </div>
         </div>
		<div class="control-group">
			<label class="control-label" for="input01">Product Name<font color="red">*</font></label>
			<div class="controls">
				<?php echo form_input($proname); ?>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="input01">Product Price<font color="red">*</font></label>
			<div class="controls">
				<?php echo form_input($proprice); ?>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="input01">Product Category<font color="red">*</font> </label>
			<div class="controls">
				<?php echo form_dropdown('pro_cate',$procate); ?>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="input01">Upload New Product <font color="red">*</font> </label>
			<div class="controls">
				<?php echo form_input($proupload); ?>
			</div>
		</div>
        <div class="control-group">
			<label class="control-label" for="input01">Description Product <font color="red">*</font> </label>
			<div class="controls">
				<textarea cols="24" rows="5" name="pro_desc"><?php echo $row->Desc; ?></textarea>
			</div>
		</div>
		
		<div class="form-actions">
			<input type="submit" class="btn btn-primary" name="btn_upload" value="Save" />
			<a href="<?php echo site_url('backend_pages/allproducts'); ?>" class="btn">Cancel </a>
		</div>
	<?php
	  	echo form_close();
	  ?>		
            
            
            
            

